package com.itheima.controller;

import com.itheima.pojo.Result;
import com.itheima.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * TODO
 *
 * @Author mr.wu
 * @Data #{DATE} #{TIME}
 */
@RestController
@RequestMapping("/report")
public class ReportController {
    @Autowired
    private ReportService reportService;
    @GetMapping("/productUpOrDown")
    public Result getProductNum(){
        List<Map<String,Object>> list = reportService.getProductNum();
        return Result.success(list);
    }
    @GetMapping("/productStatus")
    public Result getProductStatus(){
        List<Map<String,Object>> list = reportService.getProductStataus();
        return Result.success(list);
    }

}
